package player

import (
	"fmt"
	"game/game-db/orm"
	"game/game-db/orm/metag"
)

func init() {
	fmt.Println("Player")
}

type Player struct {
	orm.DbEntity
	Id       int64  `orm:"id=AUTOWIRE;comment=玩家ID"`
	Nick     string `orm:"comment=昵称"`
	UserId   string `orm:"name=user_id;comment=后台账户ID;readonly"`
	OpenId   string `orm:"name=open_id;comment=SDK账户ID;readonly"`
	Level    int32  `orm:"comment=等级"`
	Exp      int64  `orm:"comment=经验"`
	Gold     int64  `orm:"comment=金币"`
	Diamond  int64  `orm:"comment=钻石"`
	ServerId int32  `orm:"name=server_id;comment=服务器ID;readonly"`
}

func (t *Player) TableMetag() metag.TableMetag {
	tableTag := metag.TableMetag{
		Name:    "player",
		Comment: "玩家数据表",
		Indexes: make([]metag.IndexMetag, 0),
	}
	return tableTag
}

// func (p *Player) Id() int64 {
// 	return p.id
// }

// func (p *Player) Nick() string {
// 	return p.nick
// }

// func (p *Player) UserId() string {
// 	return p.userId
// }

// func (p *Player) ServerId() int32 {
// 	return p.serverId
// }
